/*
-----------------------------------------------------------------------------
Description: Simple text display and Queue Text output
-----------------------------------------------------------------------------
*/
#ifndef _TEXTOUTPUT_H
#define _TEXTOUTPUT_H

#include "Ogre.h"
#include "OgreTextAreaOverlayElement.h"
#include "OgreConfigFile.h"

using namespace Ogre;

class OgreText
{
public:
	int X,Y;
	Ogre::String itemText;
	int c;
	static OverlayManager *olm;
	static OverlayContainer *panel ;
	static Overlay *overlay;
	static TextAreaOverlayElement *textArea;
	Ogre::String OverlayName;

	OgreText(Ogre::String szElement);
   ~OgreText();
   
   void showTextNormal(Ogre::String szString,int x,int y);
   void showText();
   void setColor(int Color);
   void setText(Ogre::String szString);
   void setTextPos(int x,int y);

//private:
};

class OgreQueueText //: public Singleton<OgreQueueText>
{
public:

	OgreQueueText(Ogre::String,int,int);
	~OgreQueueText();

	bool Add(char *szString);
	//This class act like sprintf C function, get list of arguments and format and print result to Ogre screen
	bool Addf(const char *format,...);
	bool Delete();
	bool clearItems();
	bool ShowText();
	bool CheckTime();
	
	bool bFirstTime;
	
	int iSpaceBetween;
	int MaxQueTextItems; //Max text items to show
	int CurrentItems; //Actual items to show

	unsigned long currentTime;
	int timeLimit;

	static OgreQueueText *s_instance;
	static OgreText** ot;
	static OgreQueueText *instance();

};

#endif
